using System;
using Concurso.Clases.ManejadoresControles;

namespace ConcursoCV.UI.Clases.ManejadoresControles
{
	/// <summary>
	/// Summary description for ManejadorControlesFactory.
	/// </summary>
	public class ManejadorControlesFactory
	{
		public static ManejadorControles FactoryMethod(string type)
		{
			ManejadorControles mControles = null;
			switch(type)
			{
				case "TXT": //Text Box
					mControles = new ManejadorTextBox();
					break;
				case "CBX": // Combo Box
					mControles = new ManejadorDropDownList();
					break;
				case "DTP": // Date Time Picker
					mControles = new ManejadorCDatePicker();
					break;
				case "TXA": // Text Box con multiline
					mControles = new ManejadorTextArea();
					break;
				case "CBM": // Combo Box
					mControles = new ManejadorDropDownListMeses();
					break;
				case "CBA": // Combo Box
					mControles = new ManejadorDropDownListAnios();
					break;
				default:
					mControles = new ManejadorTextBox();
					break;
			}
			return mControles;
		}
	}
}
